package test.bean;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Prev;
import org.nutz.dao.entity.annotation.SQL;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.json.Json;

/**
 * @author Ixion
 *
 *         create at 2014年9月4日
 */
@Table("user_test")
public class User {
	@Id
	@Prev(@SQL(value = "select max(id) + 1 from user_test"))
	private int id;

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return Json.toJson(this);
	}

	@Name
	private String name;
	@Column("user_clob_info")
	private String clobInfo;

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the clobInfo
	 */
	public String getClobInfo() {
		return clobInfo;
	}

	/**
	 * @param clobInfo
	 *            the clobInfo to set
	 */
	public void setClobInfo(String clobInfo) {
		this.clobInfo = clobInfo;
	}

}
